from flask import Flask, Blueprint, render_template, send_from_directory, request
from apps.common.utils import get_active_theme_name

# 创建main
category_bp = Blueprint('category',
                    __name__,
                    url_prefix='/category')


@category_bp.route('/')
def category():
    """分类页面"""
    return render_template(get_active_theme_name() + '/category.html')
@category_bp.route('/<string:slug>')
def category_posts(slug):
    """分类文章列表页面"""
    return render_template(get_active_theme_name() + '/category_posts.html')